home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
cmplangm
/
1989_4
/
putimage.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-03-21
|
1KB
|
40 lines
{This code accompanies the letter from Francisco Glover on pp. 11-12 of the
April 1989 Computer Language. It's an enhancement to John Figueras's "Virtual
Mouse" article from the October 1988 issue.}
Procedure IntHandler; INTERRUPT;
{Traps the press and relase of arrow keys and F2; all other
codes are passed to normal BIOS keyboard service, now
moved from Int 9 to Int $64. This procedure may NOT be
declared in the INTERFACE.}
VAR Code: byte;
RR: Registers;
PassAlong: boolean;
Begin
Inline($FB); {Enable interrupts}
Code := Port[$60]; {Fetch scan code}
PassAlong := NOT (Up OR Down OR Left OR Right);
If (Code in [72,200, 75,203, 77,205, 80,208, 60,188]) then
Case Code of
72: Begin Up := True; Down := False; End;
200: Up := False
75,115: Begin Left := True. Right := False; End;
203: Left := False;
77,116: Begin Right := True; Left := False; End;
205: Right := False;
80: Begin Down := True; Up := False; End;
208: Down := False;
60: Slow := True;
118: Slow := False;
End; {Case}
If (PassAlong) then Intr($64,RR) else
Begin
Port[$61] := Port[$61] OR $80;
Port[$61] := Port[$61] AND $7F;
Port[$20] := $20;
End;
End; {IntHandler}